All Functions of Week 2

rnorm

{base}

Generate random numbers from a normal distribution

filter

{dplyr}

Filter out rows of a data frame according to logical vector

library

{base}

Load an R package

c

{base}

Combine values/vectors into a vector

setwd

{base}

Set Working Directory

as.data.frame

{base}

Functions to check if an object is a data frame, or coerce it if possible.

sample

{base}

Takes a sample of the specified size

which

{base}

return indexes of TRUE entries of a logical vector

ifelse

{base}

Return a or b depending on the value of test

dnorm

{stats}

Density distribution for the normal distribution

lm

{base}

Fit a linear model

as.character

{base}

Coerce a vector to character

mean

{base}

Get mean of a vector

log

{base}

log (default base = e)

nobs

{gdata}

Compute the number of non-missing observations

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

subset

{base}

Return subsets of vectors, matrices or data frames which meet conditions.

summary

{base}

Obtain summary statistics or detailed regression output

expression

{base}

Used in plots to add symbols to axes

seq

{base}

Create a sequence

par

{graphics}

Set parameters of the plotting device

data.frame

{base}

Create a data.frame from vectors

bar

{base}

Used for annotations, such as “expression(paste(”-“,bar(y)))”

plot

{graphics}

Generic function from base R to produce a plot

The end!